home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Game / board / Saga.lha / Saga / source / animtools.h < prev    next >
C/C++ Source or Header  |  2004-08-31  |  4KB  |  84 lines

  1. /* animtools.h */
  2. #ifndef GELTOOLS_H
  3. #define GELTOOLS_H
  4.  
  5. /*
  6. ** These data structures are used by the functions in animtools.c to
  7. ** allow for an easier interface to the animation system.
  8. */
  9.  
  10. /* Data structure to hold information for a new VSprite.                */
  11. typedef struct newVSprite {
  12.         WORD           *nvs_Image;      /* image data for the vsprite   */
  13.         WORD           *nvs_ColorSet;   /* color array for the vsprite  */
  14.         SHORT           nvs_WordWidth;  /* width in words               */
  15.         SHORT           nvs_LineHeight; /* height in lines              */
  16.         SHORT           nvs_ImageDepth; /* depth of the image           */
  17.         SHORT           nvs_X;          /* initial x position           */
  18.         SHORT           nvs_Y;          /* initial y position           */
  19.         SHORT           nvs_Flags;      /* vsprite flags                */
  20.         USHORT          nvs_HitMask;    /* Hit mask.                    */
  21.         USHORT          nvs_MeMask;     /* Me mask.                     */
  22.         } NEWVSPRITE;
  23.  
  24. /* Data structure to hold information for a new Bob.                */
  25. typedef struct newBob {
  26.         WORD       *nb_Image;       /* image data for the bob       */
  27.         SHORT       nb_WordWidth;   /* width in words               */
  28.         SHORT       nb_LineHeight;  /* height in lines              */
  29.         SHORT       nb_ImageDepth;  /* depth of the image           */
  30.         SHORT       nb_PlanePick;   /* planes that get image data   */
  31.         SHORT       nb_PlaneOnOff;  /* unused planes to turn on     */
  32.         SHORT       nb_BFlags;      /* bob flags                    */
  33.         SHORT       nb_DBuf;        /* 1=double buf, 0=not          */
  34.         SHORT       nb_RasDepth;    /* depth of the raster          */
  35.         SHORT       nb_X;           /* initial x position           */
  36.         SHORT       nb_Y;           /* initial y position           */
  37.         USHORT      nb_HitMask;     /* Hit mask.                    */
  38.         USHORT      nb_MeMask;      /* Me mask.                     */
  39.         } NEWBOB ;
  40.  
  41. /* Data structure to hold information for a new animation component.       */
  42. typedef struct newAnimComp {
  43.         WORD  (*nac_Routine)(); /* routine called when Comp is displayed.   */
  44.         SHORT   nac_Xt;         /* initial delta offset position.           */
  45.         SHORT   nac_Yt;         /* initial delta offset position.           */
  46.         SHORT   nac_Time;       /* Initial Timer value.                     */
  47.         SHORT   nac_CFlags;     /* Flags for the Component.                 */
  48.         } NEWANIMCOMP;
  49.  
  50. /* Data structure to hold information for a new animation sequence.         */
  51. typedef struct newAnimSeq {
  52.         struct AnimOb  *nas_HeadOb; /* common Head of Object.               */
  53.         WORD   *nas_Images;         /* array of Comp image data             */
  54.         SHORT  *nas_Xt;             /* arrays of initial offsets.           */
  55.         SHORT  *nas_Yt;             /* arrays of initial offsets.           */
  56.         SHORT  *nas_Times;          /* array of Initial Timer value.        */
  57.         WORD (**nas_Routines)();    /* Array of fns called when comp drawn  */
  58.         SHORT   nas_CFlags;         /* Flags for the Component.             */
  59.         SHORT   nas_Count;          /* Num Comps in seq (= arrays size)     */
  60.         SHORT   nas_SingleImage;    /* one (or count) images.               */
  61.         } NEWANIMSEQ;
  62.  
  63. #define INTUITIONNAME "intuition.library" /* intuitionbase.h does not define a library name. */
  64. #endif
  65.  
  66. /* animtools_proto.h */
  67. #include        <clib/dos_protos.h>
  68. #include        <clib/exec_protos.h>
  69. #include        <clib/graphics_protos.h>
  70. #include        <clib/intuition_protos.h>
  71.  
  72. struct GelsInfo *setupGelSys(struct RastPort *rPort, BYTE reserved);
  73. VOID            cleanupGelSys(struct GelsInfo *gInfo, struct RastPort *rPort);
  74. struct VSprite  *makeVSprite(NEWVSPRITE *nVSprite);
  75. struct Bob      *makeBob(NEWBOB *nBob);
  76. struct AnimComp *makeComp(NEWBOB *nBob, NEWANIMCOMP *nAnimComp);
  77. struct AnimComp *makeSeq(NEWBOB *nBob, NEWANIMSEQ *nAnimSeq);
  78. VOID            freeVSprite(struct VSprite *vsprite);
  79. VOID            freeBob(struct Bob *bob, LONG rasdepth);
  80. VOID            freeComp(struct AnimComp *myComp, LONG rasdepth);
  81. VOID            freeSeq(struct AnimComp *headComp, LONG rasdepth);
  82. VOID            freeOb(struct AnimOb *headOb, LONG rasdepth);
  83.  
  84.